1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and a system for improving display of three dimensional objects. Still more particularly, the present invention provides a method to calculate the intersection of a bounding volume with a plane parallel to the front of the screen at a specified depth.
2. Description of the Related Art
Realistic 3D rendering of images is critically important in many computer applications. Volume rendering via texture mapping requires the calculation of the intersection of a series of screen-aligned planes with a bounding volume. This volume rendering is accomplished by computing which halfspace of each side of the bounding volume a vertex of a polygon lies and then computing the intersection of the planes which lie in the inner halfspaces of the bounding volumes. The problem of computing the intersection of a plane with a bounding volume with the least computationally expensive algorithm is key to determining the set of polygons that must be texture mapped and composited in the graphics frame buffer to render volumetric data.
Therefore, it would be advantageous to have a method and system to minimize the floating point computation needed to perform volume rendering via texture mapping.
Apparatus and methods are provided to perform volume rendering via composited texture-mapped convex polyhedra. This is accomplished by generating a sequence of z polygons defined by the intersection of a sequence of z planes parallel to the view plane with the convex polyhedron. The vertices of the convex polyhedron are numbered sequentially based on z-axis depth and this defines a sequence of slabs that are bounded by z planes intersecting the vertices. The edges of the convex polyhedron are numbered based on viewing the polyhedron along an axis from the closest vertex to the furthest vertex.
A data structure maintains a list of active edges for each slab, where an edge is xe2x80x9cactivexe2x80x9d if the edge intersects any z plane in the slab. Each vertex in the z polygon is defined by the intersection of an active edge with the z plane. The z polygon is rendered by connecting adjacent vertices, where the ordering is determined by the order of the active edges in the slab. Each edge of the z polygon can be rendered by performing only three multiplications, two additions, and one subtraction. These computationally efficient methods make volume rendering via texture mapping feasible.